import 'package:flutter/material.dart';

class NavCol extends StatefulWidget {
  const NavCol({super.key, required this.icon, required this.title, this.onNavClick});

  final String icon;
  final String title;
  final Function? onNavClick;
  @override
  State<NavCol> createState() => _NavColState();
}

class _NavColState extends State<NavCol> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        // widget.onNavClick!();
        widget.onNavClick?.call();
      },
      child:Expanded(
        child: Column(
          children: [
            Image.asset(
              widget.icon,
              width: 24,
              height: 24,
            ),
            Text(
              widget.title,
              style: const TextStyle(
                fontSize: 12,
                color: Color(0xFF333333),
              )
            )
          ]
        )
      )
    );
  }
}
